<?php

namespace App\Component\Paginator;

use Hyperf\Paginator\LengthAwarePaginator;

class SimplePaginator extends LengthAwarePaginator {

    public function toArray(): array
    {
        return [
            'page' => $this->currentPage(),
            'list' => $this->items->toArray(),
            'total_page' => $this->lastPage(),
            'total_count' => $this->total(),
        ];
    }
}

